﻿using LuaInterface;
using UnityEngine;

namespace LuaFramework
{
    [RequireComponent(typeof(LuaBehaviour))]
    public class LuaGameObjectProperty : LuaProperty
    {
        [System.Serializable]
        public class Injection
        {
            public string name;
            public GameObject value;
        }

        public Injection Object;


        override public void Inject(LuaTable table)
        {
            if (Object != null)
            {
                var name = Object.name;
                var obj = Object.value;
                table[name] = obj;
            }
        }
    }

}